<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品编辑</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <script src="/lib/jquery/1.9.1/jquery.js"></script>
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
    <script src="/icheck-1.x/icheck.js"></script>
    <script src="/bootstrap-switch-master/dist/js/bootstrap-switch.js"></script>
    <link href="/bootstrap-switch-master/dist/css/bootstrap3/bootstrap-switch.css" rel="stylesheet">
    <link href="/icheck-1.x/skins/all.css" rel="stylesheet">
    <script src="/H-ui.admin/lib/ueditor/1.4.3/ueditor.config.js"></script>
    <script src="/H-ui.admin/lib/ueditor/1.4.3/ueditor.all.js"></script>
    <link href="/H-ui.admin/lib/webuploader/0.1.5/webuploader.css" rel="stylesheet" type="text/css" >
    <script src="/H-ui.admin/lib/webuploader/0.1.5/webuploader.js"></script>
    <script src="/bootstrap-validate/js/bootstrapValidator.js"></script>
    <script src="/bootstrap-validate/css/bootstrapValidator.css"></script>
    <script src="/H-ui.admin/lib/layer/2.4/layer.js"></script>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style>
        .myerror{
            color: red;
        }
    </style>
</head>
<body>
<form action="{:url('edit')}" class="form-horizontal" method="post" style="margin: 25px 50px">
    <input type="text" value="{$item?$item.id:''}" name="id" hidden>
    <div class="form-group">
        <label class="col-sm-2 control-label">用户</label>
        <div class="col-sm-6">
            <select class="form-control" name="uid">
                <option >———请选择用户———</option>
                {foreach $users as $key  =>$value}
                <option value="{$value.uid}" {:isset($item)&&$item.uid==$value.uid?'selected':''}>{$value.rname}</option>
                {/foreach}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">描述</label>
        <div class="col-sm-6">
            <textarea name="describle" lang="" translate="yes" style="width: 100%" cols="10" rows="12">{$item?$item.describle:''}</textarea>
        </div>
    </div>


    <div class="form-group">
        <label class="col-sm-2 control-label">状态</label>
        <div class="col-sm-8">
            <div class="radio-inline">
                <input type="radio" name="status" value="0" class="form-control" {:isset($item)&&$item.status==0?'checked':''}>&emsp;处理
            </div>
            <div class="radio-inline">
                <input type="radio"name="status" value="1"  class="form-control" {:isset($item)&&$item.status==1?'checked':''}>&emsp;已处理
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="col-sm-4 control-label"></label>
        <div class="col-sm-2">
            <button type="submit" id="ctlBtn" class="btn btn-primary" style="float: left;">&emsp;提交&emsp;</button>
            <button type="button" class="btn btn-default" style="float: right;" onclick="history.back();">&emsp;返回&emsp;</button>
        </div>
    </div>
</form>
<script>
    $("input:not('.make-switch')").iCheck({
        labelHover : false,
        cursor : true,
        checkboxClass : 'icheckbox_square-blue',
        radioClass : 'iradio_square-blue',
        increaseArea : '20%'
    });
</script>
</body>
</html>